package com.stenio.fancat.service.enums;

/**
 * @author liuan
 * @create 2019-02-11 11:06
 */
public enum HotSaleStatus {

    ON(1,"热销"),
    OFF(0,"非热销");

    private int hotStatue;
    private String desc;

    HotSaleStatus(int hotStatue, String desc) {
        this.hotStatue = hotStatue;
        this.desc = desc;
    }

    public int getHotStatue() {
        return hotStatue;
    }

    public String getDesc() {
        return desc;
    }

    public static HotSaleStatus getEnumByStatus(Integer i){
        for(HotSaleStatus hotStatue:HotSaleStatus.values()){
            if(hotStatue.getHotStatue()==i){
                return hotStatue;
            }
        }
        return null;
    }

}
